using Mvc.Mailer;
using Everynet.Models;

namespace Mail.Mailers
{ 
    public class UserMailer : MailerBase, IUserMailer 	
	{
		public UserMailer()
		{
			MasterName="_Layout";
		}

        public virtual MvcMailMessage ForgotPassword(string toemail, string subject, string message)
		{
            ViewBag.Data = message;
			return Populate(x =>
			{
                x.Subject = subject;
                x.ViewName = "ForgotPassword";
                x.To.Add(toemail);
                //x.Attachments.Add(new Attachment(attachmentPath));
			});

           
		}

        public virtual MvcMailMessage Registration(string toemail, string subject, string message, signUpModel passModel, SummaryModel passModelOrder, AgreementModel passmodelAgree)
		{
            ViewBag.Data = message;
            ViewBag.AllData = passModel.listSignUpDetail;
            ViewBag.AllOrderData = passModelOrder;
            ViewBag.AllAgreement = passmodelAgree;
			return Populate(x =>
			{
                x.Subject = subject;
                x.ViewName = "Registration";
                x.To.Add(toemail);
            });
		}

        public virtual MvcMailMessage SignUpQuickMail(string toemail, string subject, string message, string getUserPassword)
        {
            ViewBag.PasswordData = getUserPassword;
            ViewBag.EmailData = toemail;
          
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "SignUpQuickMail";
                x.To.Add(toemail);
            });
        }

        public virtual MvcMailMessage PaymentConfirmation(string toemail, string subject, string message)
        {
            ViewBag.Data = message;
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "PaymentConfirmation";
                x.To.Add(toemail);
               
            });
        }
        public virtual MvcMailMessage ConnectionConfirmation(string toemail, string subject, string message)
        {
            ViewBag.Data = message;
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "ConnectionConfirmation";
                x.To.Add(toemail);
                
            });
        }

        public virtual MvcMailMessage NakedNotifyToUser(string toemail, string subject)
        {
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "NakedQualificationNotifyUser";
                x.To.Add(toemail);
            });
        }
        public virtual MvcMailMessage NakedNotifyToVendor(string toemail, string subject, string getUserEmail, string fullName, string getServicePhoneNumber)
        {
            ViewBag.userEmail = getUserEmail;
            ViewBag.userFullName = fullName;
            ViewBag.userServicePhoneNumber = getServicePhoneNumber;
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "NakedQualificationNotifyVendor";
                x.To.Add(toemail);
            });
        }

        public virtual MvcMailMessage QualificationFail(string toemail, string subject, string getUserEmail, string fullName, string getServicePhoneNumber)
        {
            ViewBag.userEmail = getUserEmail;
            ViewBag.userFullName = fullName;
            ViewBag.userServicePhoneNumber = getServicePhoneNumber;
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "QualificationFail";
                x.To.Add(toemail);
            });
        }

        public virtual MvcMailMessage PlanChange(string toemail, string subject, string message, signUpModel passModel, SummaryModel passModelOrder, AgreementModel passmodelAgree)
        {
            ViewBag.Data = message;
            ViewBag.AllData = passModel.listSignUpDetail;
            ViewBag.AllOrderData = passModelOrder;
            ViewBag.AllAgreement = passmodelAgree;
            return Populate(x =>
            {
                x.Subject = subject;
                x.ViewName = "PlanChange";
                x.To.Add(toemail);
            });
        }
 	}
}